package org.example.y24.m11;

import java.util.Scanner;

public class MainC {
    public static void main(String[] args) {
       while (true) {
           int n = new Scanner(System.in).nextInt();
           int a = 1;
           int b = 1;
           while (n > 2){
               int t = a;
               a += b;
               b  = t;
               n--;
           }
           System.out.println(a);
       }
    }
}
